#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
char crr[100010];
void puch_back(char* arr, int i)
{
	for (int j = 0; j <= i/2; j++)
	{
		int swap = arr[j];
		arr[j] = arr[i - j];
		arr[i - j] = swap;
	}
}
void add(char* arr, char* brr)
{
	int i = strlen(arr);
	int j = strlen(brr);
	if (i < j) return add(brr, arr);
	int t = 0;
	int m = 0;
	for (m = 0; m < i; m++)
	{
		t += arr[m] - '0';
		if (m < j) t += brr[m] - '0';
		crr[m] = t % 10;
		t = t / 10;
	}
	if (t != 0)
	{
		crr[m] = t;
		i++;
	}
	for (m = 0; m < i; m++)
	{
		crr[m] += '0';
	}
}
int main()
{
	char arr[10010] = "0";
	char brr[10010] = "0";
	gets(arr);
	gets(brr);
	int i = strlen(arr) - 1;
	int j = strlen(brr) - 1;
	puch_back(arr, i);
	puch_back(brr, j);
	add(arr, brr);
	char c = strlen(crr);
	for (int m = c - 1; m >= 0; m--)
	{
		printf("%d", crr[m] - '0');
	}
	return 0;
}